package com.study.design.model.behaviorPattern.chainOfResponsibility;

/**
* @Name: Director
* @Description: 主任
* @Author: 李超	lc_jack@foxmail.com
* @CreateDate: 2017-2-15 下午3:31:02 
* @Version: V1.0
 */
public class GeneralManager extends Leader {

	public GeneralManager(String name) {
		super(name);
	}

	@Override
	public void handleRequest(LeaveRequest request) {
		if(request.getLeaveDays() < 30) {
			System.out.println("员工：" + request.getEmpName() + 
				"请假，天数：" + request.getLeaveDays() + 
				"，原因：" + request.getReason());
			System.out.println("总经理：" + name + "，审批通过！");
		} else {
			System.out.println("莫非[" + request.getEmpName() + "]想辞职，居然请假" + request.getLeaveDays() + "天！");
		}
	}

}
